// Copyright 2011 Jefferson Willian
// willmont7@gmail.com

#include <cstdio>
#include <cmath>

/* Distancia de dosi pontos */
double dist(double x1, double y1, double x2, double y2) {
  return sqrt(pow(x2-x1, 2)+pow(y2-y1, 2));
}

int main() {
  double points[1000][2];
  int n;
  double t;
  double lower = 20000000.;

  scanf("%d", &n);

  for (int i = 0;i < n;i++)
    scanf("%lf%lf", &points[i][0], &points[i][1]);

  /* Verifica cada par de pontos */
  for (int i = 0;i < n;i++)
    for (int j = i+1;j < n;j++) {
      t = dist(points[i][0], points[i][1], points[j][0], points[j][1]);
      if (t < lower)
        lower = t;
    }

  printf("%.3lf\n", lower);

  return 0;
}
